
import { OrderStatus, LogisticsStatus,AfterSaleStatus } from "./Enum"

let conditions = {
    useNature: [
        { enmuType: 1, description: '营运' },
        { enmuType: 2, description: '非营运' },
        { enmuType: 3, description: '营转非' },
        { enmuType: 4, description: '租赁营运' },
        { enmuType: 5, description: '租赁非营运' },
        { enmuType: 6, description: '网约车转非营运' }
    ],
    bodyStyle: [
        { enmuType: 1, description: '两厢' },
        { enmuType: 2, description: '三厢' },
        { enmuType: 3, description: '掀背' },
        { enmuType: 4, description: '旅行版' },
        { enmuType: 5, description: '硬顶敞篷' },
        { enmuType: 6, description: '软顶敞篷' },
        { enmuType: 7, description: '硬顶跑车' },
        { enmuType: 8, description: '客车' },
        { enmuType: 9, description: '货车' }
    ],
    gearboxType: [
        { enmuType: 1, description: '手动' },
        { enmuType: 2, description: '自动' },
        { enmuType: 3, description: '手自一体' },
        { enmuType: 4, description: '双离合' },
        { enmuType: 5, description: '无级变速' },
        { enmuType: 6, description: 'AMT机械变速' },
        { enmuType: 9, description: '其它' }
    ],
    keyNum: [
        { enmuType: 1, description: '1' },
        { enmuType: 2, description: '2' },
        { enmuType: 3, description: '3' },
        { enmuType: 4, description: '4' }
    ],
    saleStatus: [
        { enmuType: 1, description: '预售' },
        { enmuType: 2, description: '在售' },
        { enmuType: 3, description: '已预定' },
        { enmuType: 4, description: '已售' },
        { enmuType: 5, description: '下架' }
    ],
    emissionStd: [
        { enmuType: 1, description: '国I' },
        { enmuType: 2, description: '国II' },
        { enmuType: 3, description: '国III' },
        { enmuType: 4, description: '国IV' },
        { enmuType: 5, description: '国V' },
        { enmuType: 6, description: '国Ⅵ' }
    ],
    storeStatus: [
        { enmuType: 1, description: '在途' },
        { enmuType: 2, description: '在厅' },
        { enmuType: 3, description: '整备' },
        { enmuType: 4, description: '外借' },
        { enmuType: 5, description: '转场' },
        { enmuType: 6, description: '已出库' }
    ],
    carRank: [
        { enmuType: 'a00', description: '微型' },
        { enmuType: 'a0', description: '小型车' },
        { enmuType: 'a', description: '紧凑型' },
        { enmuType: 'b', description: '中型车' },
        { enmuType: 'd', description: '大型车' },
        { enmuType: 'suv', description: 'SUV' },
        { enmuType: 'mpv', description: 'MPV' },
        { enmuType: 's', description: '跑车' },
        { enmuType: 'pk', description: '皮卡' }
    ],
    energyType: [
        { enmuType: 1, description: '汽油' },
        { enmuType: 2, description: '柴油' },
        { enmuType: 3, description: '油电混合' },
        { enmuType: 4, description: '纯电动' },
        { enmuType: 5, description: '氢燃料电池' },
        { enmuType: 6, description: '插电式混动' },
        { enmuType: 7, description: '增程式' },
        { enmuType: 8, description: '汽油+48V轻混' }
    ],
    purchaseType: [
        { enmuType: 1, description: '全款' },
        { enmuType: 2, description: '合作' },
        { enmuType: 3, description: '寄售' },
        { enmuType: 4, description: '拍卖' },
        { enmuType: 5, description: '置换' },
        { enmuType: 6, description: '回购' },
        { enmuType: 7, description: '私人定制' },
        { enmuType: 8, description: '其他' }
    ],
    carDetectionStatus: [
        { enmuType: 1, description: '未自检' },
        { enmuType: 2, description: '待自检' },
        { enmuType: 3, description: '已自检' },
    ],
    detectionStatus: [
        { enmuType: 1, description: '待检测' },
        { enmuType: 2, description: '检测中' },
        { enmuType: 3, description: '检测完成' },
        { enmuType: 4, description: '检测取消' },
    ],
    ownershipEntity: [
        { enmuType: 1, description: '公户' },
        { enmuType: 2, description: '私户' },
    ],
    orderStatus: [
        { enmuType: OrderStatus.OrderStatusWaitSign, description: '待签署' },
        { enmuType: OrderStatus.OrderStatusSigning, description: '签署中' },
        { enmuType: OrderStatus.OrderStatusRejectSign, description: '已拒签' },
        { enmuType: OrderStatus.OrderStatusWaitDelivery, description: '待发货' },
        { enmuType: OrderStatus.OrderStatusWaitPay, description: '待付款' },
        { enmuType: OrderStatus.OrderStatusWaitReceipt, description: '待收货' },
        { enmuType: OrderStatus.OrderStatusWaitSettlement, description: '待结算' },
        { enmuType: OrderStatus.OrderStatusServicing, description: '售后中' },
        { enmuType: OrderStatus.OrderStatusFinisded, description: '已完成' },
        { enmuType: OrderStatus.OrderStatusCanceled, description: '已取消' },
        { enmuType: OrderStatus.OrderStatusClosed, description: '已关闭' },
        { enmuType: 41, description: '订单详情' }
    ],
    
    afterSaleOrderStatus: [
        { enmuType: AfterSaleStatus.OrderStatusWaitConfirm, description: '待确认' },
        { enmuType: AfterSaleStatus.OrderStatusWaitSign, description: '待签署' },

        { enmuType: AfterSaleStatus.OrderStatusSigning, description: '签署中' },
        { enmuType: AfterSaleStatus.OrderStatusRejectSign, description: '已拒签' },
        { enmuType: AfterSaleStatus.OrderStatusWaitDelivery, description: '待发货' },
        { enmuType: AfterSaleStatus.OrderStatusWaitSettlement, description: '待结算' },
        { enmuType: AfterSaleStatus.OrderStatusWaitReceipt, description: '待收货' },
        { enmuType: AfterSaleStatus.OrderStatusFinisded, description: '已完成' },
        { enmuType: AfterSaleStatus.OrderStatusClosed, description: '已关闭' },
        { enmuType: AfterSaleStatus.OrderStatusCancel, description: '已撤销' },
        
    ],
    logisticsStatus: [
        { enmuType: LogisticsStatus.LogisticsStatusWait, description: '受理中' },
        { enmuType: LogisticsStatus.LogisticsStatusInTransit, description: '运输中' },
        { enmuType: LogisticsStatus.LogisticsStatusDeliverCar, description: '已完成' },
        { enmuType: LogisticsStatus.LogisticsStatusCancelr, description: '已取消' },
    ],
    afterSaleReason: [
        { enmuType: 1, description: '车况与描述不符' },
        { enmuType: 2, description: '车辆资质问题' },
        { enmuType: 3, description: '与卖家协商一致' },
        
    ],
}

export function conditionsWithType(type) {
    return conditions[type]
}

export function conditionObjWithType(type) {
    let conditonArray = conditions[type]
    let condition = {}
    conditonArray.map((item)=>{
        condition[item.enmuType] = item.description
    })
    return condition
}